/**
 * Author: CreateSun
 * Date: 2020/8/14
 * Description: 成员管理接口
 */
import Vue from 'vue';
const service = Vue.prototype.$http;
/**
 * 添加成员
 * @param params = {projectId, userPhone}
 * @returns {AxiosPromise}
 */
export const memberAdd = params => {
    console.log(params)
    return service({
        url: 'member/add',
        method: 'get',
        params
    });
};

/**
 * 成员身份修改
 * @param params = {
  "projectId": "string",
  "roleId": "string",
  "userPhone": "string"
}
 * @returns {AxiosPromise}
 */
export const memberChange = params => {
    return service({
        url: 'member/change',
        method: 'put',
        params
    });
};

/**
 * 成员删除
 * @param params = {projectId, userPhone}
 * @returns {AxiosPromise}
 */
export const memberRemove = params => {
    return service({
        url: 'member/remove',
        method: 'delete',
        params
    });
};

/**
 * 成员管理
 * 获取成员列表信息
 * @param query
 * @returns {AxiosPromise}
 */
export const getMember = query => {
    return service({
        url: 'member/show',
        method: 'get',
        params: query
    });
};

